/*
 * Copyright 2025 arisgo@163.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.arisgo.cloud.attendance.clazz.service;

import com.arisgo.cloud.attendance.clazz.core.ArrangeContext;
import com.arisgo.cloud.attendance.clazz.vo.ClassInfoDetailVo;
import com.arisgo.cloud.attendance.clazz.vo.TemporaryArrangeVo;
import com.arisgo.cloud.web.mybatis.service.ICloudService;

import java.time.LocalDate;
import java.util.List;

import com.arisgo.cloud.attendance.clazz.entity.ClassInfo;
import com.arisgo.cloud.attendance.clazz.vo.ClassInfoVo;

/**
 * 班
 *
 * @author Coulson
 * @since 2024-12-31
 */
public interface ClassInfoService extends ICloudService<ClassInfo, ClassInfoVo> {

    List<ClassInfoDetailVo> findByStaffId(Long tenantId, Long staffId, LocalDate startDate, LocalDate endDate);

    /**
     * 查询班次信息
     * 默认查询一个月的班次信息
     * 指定开始时间和结束时间，则查询指定日期内的班次信息
     *
     * @param tenantId 租户id
     * @param startDate 开始时间
     * @param endDate 结束时间
     */
    List<ClassInfoDetailVo> findClassInfo(Long tenantId, LocalDate startDate, LocalDate endDate);

    List<ClassInfoDetailVo> findClassDetail(Long tenantId, LocalDate workday);

    boolean removeClassInfo(Long classId);

    boolean removeClassInfo(List<Long> classIds);

    boolean arrange(String type, ArrangeContext context);

    boolean arrange(TemporaryArrangeVo vo);
}
